#include "Rectangle.h"

Rectangle::Rectangle(): width(3), height(10){
}

Rectangle::Rectangle(double width, double height){
	this->width = width;
	this->height = height;
}

Rectangle::Rectangle(const Rectangle & rect){
	this->width = rect.getWidth();
	this->height = height;
}

Rectangle::~Rectangle(){
}

double Rectangle::getArea() const{
	return width*height;
}
double Rectangle::getWidth() const{
	return width;
}
void Rectangle::setWidth(double width){
	this->width = width;
}
double Rectangle::getHeight() const{
	return height;
}
void Rectangle::setHeight(double height){
	this->height = height;
}

const Rectangle Rectangle::operator + (const Rectangle & rect){
	Rectangle temp(*this);
	temp.setHeight(temp.getHeight() + rect.getHeight());
	temp.setWidth(temp.getWidth() + rect.getWidth());
	return temp;
}